﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
    xmlns:ControlMenu="clr-namespace:Sinacor.UI.Application.Menu.SmartClient;assembly=Sinacor.UI.Application.Menu.View.SmartClient">
	<ControlMenu:SinacorMenuItemConverter x:Key="boolConverter" />
	<!--BEGIN MENU-->
	<!--BEGIN VERTICAL SCROLLBAR-->
	<!--BEGIN BUTTON UP-->
	<Style x:Key="ControlMenuVerticalScrollBarButtonUp" TargetType="{x:Type RepeatButton}">
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="IsEnabled" Value="False"/>
		<Setter Property="Height" Value="18"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<StackPanel Orientation="Vertical" VerticalAlignment="Top">
						<Border x:Name="Border" Height="13" CornerRadius="12,12,0,0" Background="{DynamicResource BrushMenuScrollBarButtonUpBackground}">
							<Path x:Name="ArrowDesign" Width="12" Height="5.96875" Stretch="Fill" Fill="{DynamicResource BrushMenuScrollBarArrowUpFill}" Data="{DynamicResource IconMenuScrollViewerArrowUp}"></Path>
						</Border>
						<Path x:Name="ButtonBase" Fill="{DynamicResource BrushMenuScrollBarButtonLineBackground}" Margin="0,0.5,0,0" Height="2.3" VerticalAlignment="Stretch" Stretch="Fill" />
					</StackPanel>
					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ScrollViewer}}, Path=ComputedVerticalScrollBarVisibility}" Value="Visible">
							<Setter Property="IsEnabled" Value="True"/>
						</DataTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Background" Value="{DynamicResource BrushMenuScrollBarButtonUpBackgroundDisabled}" TargetName="Border"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarArrowFillDisabled}" TargetName="ArrowDesign"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarButtonLineBackgroundDisabled}" TargetName="ButtonBase"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" Value="{DynamicResource BrushMenuScrollBarButtonUpBackgroundHover}" TargetName="Border"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarArrowFillHover}" TargetName="ArrowDesign"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarButtonLineBackgroundHover}" TargetName="ButtonBase"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--END BUTTON UP-->

	<!--BEGIN BUTTON DOWN-->
	<Style x:Key="ControlMenuVerticalScrollBarButtonDown" TargetType="{x:Type RepeatButton}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="IsEnabled" Value="False"/>
		<Setter Property="Height" Value="18"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
						<Path x:Name="ButtonBase" Fill="{DynamicResource BrushMenuScrollBarButtonLineBackground}" Height="2.3" VerticalAlignment="Stretch" Stretch="Fill" />
						<Border x:Name="Border" Height="13" Margin="0,1,0,0" CornerRadius="0,0,12,12" Background="{DynamicResource BrushMenuScrollBarButtonDownBackground}">
							<Path x:Name="ArrowDesign" Width="12" Height="5.96875" Stretch="Fill" Data="{DynamicResource IconMenuScrollViewerArrowDown}" Fill="{DynamicResource BrushMenuScrollBarArrowDownFill}"/>
						</Border>
					</StackPanel>
					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ScrollViewer}}, Path=ComputedVerticalScrollBarVisibility}" Value="Visible">
							<Setter Property="IsEnabled" Value="True"/>
						</DataTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Background" Value="{DynamicResource BrushMenuScrollBarButtonDownBackgroundDisabled}" TargetName="Border"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarArrowFillDisabled}" TargetName="ArrowDesign"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarButtonLineBackgroundDisabled}" TargetName="ButtonBase"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" Value="{DynamicResource BrushMenuScrollBarButtonDownBackgroundHover}" TargetName="Border"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarArrowFillHover}" TargetName="ArrowDesign"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuScrollBarButtonLineBackgroundHover}" TargetName="ButtonBase"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--END BUTTON DOWN-->
	<!--END VERTICAL SCROLLBAR-->

	<!--BEGIN SCROLLVIEWER-->
	<Style x:Key="ControlMenuScrollViewer" TargetType="ScrollViewer">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ScrollViewer">
					<Border x:Name="Border" CornerRadius="5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
						<Grid x:Name="Grid" SnapsToDevicePixels="True">
							<Grid.RowDefinitions>
								<RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
								<RowDefinition Height="0.00001*"/>
								<RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
							</Grid.RowDefinitions>
							<RepeatButton x:Name="RepeatButtonUp" Style="{StaticResource ControlMenuVerticalScrollBarButtonUp}" Command="{x:Static ScrollBar.LineUpCommand}" VerticalAlignment="Top"/>
							<ScrollContentPresenter Margin="{TemplateBinding Padding}" x:Name="PART_ScrollContentPresenter" Grid.Column="0" Grid.Row="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" HorizontalAlignment="Left"/>
							<RepeatButton x:Name="RepeatButtonDown" Style="{StaticResource ControlMenuVerticalScrollBarButtonDown}" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}" VerticalAlignment="Bottom"/>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--END SCROLLVIEWER-->

	<Style x:Key="ControlMenuRollBackModulesIconButton" TargetType="Button">
		<Setter Property="Width" Value="20.413"/>
		<Setter Property="Height" Value="22"/>
		<Setter Property="Margin" Value="0,1.2,0,0"/>
		<Setter Property="Command" Value="Controls:SinacorMenuCommands.RollbackModules"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Canvas>
						<Canvas x:Name="btnRollBackCanvas1" Width="35" Height="19.001" Background="{DynamicResource BrushRollBackModulesBackGround}" >
							<Canvas x:Name="btnRollBackCanvas2" Width="Auto" Height="Auto" Canvas.Left="0" Canvas.Top="0" HorizontalAlignment="Left" VerticalAlignment="Top">
								<Path x:Name="PART_DockedIcon" Fill="{DynamicResource BrushRollBackModules}" Data="{DynamicResource IconRollBackModules}" ToolTip="{DynamicResource Infra.Controls.Tooltip.RollbackModules}"/>
							</Canvas>
						</Canvas>
					</Canvas>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Fill" TargetName="PART_DockedIcon" Value="{DynamicResource BrushRollBackModulesHover}" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ControlMenuIconButton" TargetType="Button">
		<Setter Property="Width" Value="20.413"/>
		<Setter Property="Height" Value="22"/>
		<Setter Property="Margin" Value="0,1.2,0,0"/>
		<Setter Property="Command" Value="Controls:SinacorMenuCommands.RollbackModules"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Rectangle x:Name="PART_DockedIcon" Fill="{DynamicResource IconSinacorLogoPlus}" Width="20.413" Height="21" Margin="{TemplateBinding Margin}"/>

					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=ModulePlus}" Value="True">
							<Setter Property="Fill" Value="{DynamicResource IconSinacorLogoPlus}" TargetName="PART_DockedIcon" />
						</DataTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ControlMenuHeaderButton" TargetType="Button">
		<Setter Property="Width" Value="96.668"/>
		<Setter Property="Height" Value="21.377"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid>
						<Rectangle x:Name="PART_Icon" Fill="{DynamicResource IconSinacorLogoPlus}" StrokeMiterLimit="2.75" StrokeThickness="0.3" HorizontalAlignment="Left" Width="20.356" Margin="0,0.3,0,0"/>
						<Rectangle x:Name="PART_Name" Fill="{DynamicResource IconSinacorName}" StrokeMiterLimit="2.75" StrokeThickness="0.3" Margin="24.106,0,0,1"/>
					</Grid>
					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=ModulePlus}" Value="True">
							<Setter Property="Fill" Value="{DynamicResource IconSinacorLogoPlus}" TargetName="PART_Icon"/>
							<Setter Property="Fill" Value="{DynamicResource IconSinacorNamePlus}" TargetName="PART_Name"/>
						</DataTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<ControlTemplate x:Key="ControlMenu" TargetType="{x:Type Controls:SinacorMenu}">
		<Border Background="{DynamicResource BrushMenuBackground}" CornerRadius="12" BorderBrush="{DynamicResource BrushMenuBorder}" Width="139" Height="317" BorderThickness="2">
			<StackPanel Orientation="Vertical" Margin="0,4,0,0">
				<Grid Width="96.668" Height="21.377" Canvas.Left="21.157" Canvas.Top="23.171" Background="{x:Null}">
					<Button Style="{StaticResource ControlMenuHeaderButton}"/>
				</Grid>
				<Path HorizontalAlignment="Stretch" Margin="-2,5,-2,0" Height="2" Stretch="Fill" SnapsToDevicePixels="False" StrokeThickness="1.5" StrokeLineJoin="Bevel" Stroke="{DynamicResource BrushMenuSeparator}" Data="F1 M 1.22913,49.5484L 137.479,49.5484"/>
				<TextBlock Text="{TemplateBinding SelectedCompany}" ToolTip="{TemplateBinding SelectedCompany}" Margin="5,5,0,0" Foreground="{DynamicResource BrushMenuItemForeground}" Style="{DynamicResource ControlFont}" TextTrimming="CharacterEllipsis"/>
				<Path HorizontalAlignment="Stretch" Margin="-2,6,-2,0" Height="2" Stretch="Fill" SnapsToDevicePixels="False" StrokeThickness="1.5" StrokeLineJoin="Round" Stroke="{DynamicResource BrushMenuSeparator}" Data="F1 M 1.22913,49.5484L 137.479,49.5484"/>
				<StackPanel IsItemsHost="True" Margin="0,2,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="Auto" Height="Auto" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
			</StackPanel>
		</Border>
	</ControlTemplate>
	<ControlTemplate x:Key="ControlMenuDocked" TargetType="{x:Type Controls:SinacorMenu}">
		<Grid>
			<Path x:Name="PART_BorderLeft" Fill="{DynamicResource BrushMenuDockedBorder}" Visibility="Collapsed" Width="30" Height="290" SnapsToDevicePixels="False" Margin="0,0,-2,0" VerticalAlignment="Top" Stretch="Fill" StrokeThickness="2" StrokeLineJoin="Round" Stroke="{DynamicResource BrushMenuBorder}" Data="F1 M 35.9765,14.6684C 35.9765,17.0157 35.3671,19.2206 34.2979,21.1336L 34.3164,22.0033L 34.3164,185.939C 34.3164,196.985 25.3621,205.939 14.3164,205.939L 7.76809,205.939L 7.76808,2.10588L 24.9764,2.10596C 26.109,2.10596 25.4545,2.43762 26.4765,2.10583C 32.7314,2.6167 35.9765,9.3073 35.9765,14.6684 Z "/>
			<Path x:Name="PART_BorderRight" Fill="{DynamicResource BrushMenuDockedBorder}" Width="30" Height="290" Stretch="Fill" StrokeThickness="2" Margin="-2,0,0,0" VerticalAlignment="Top" StrokeLineJoin="Round" Stroke="{DynamicResource BrushMenuBorder}" Data="F1 M 35.9765,14.6684C 35.9765,17.0157 35.3671,19.2206 34.2979,21.1336L 34.3164,22.0033L 34.3164,185.939C 34.3164,196.985 25.3621,205.939 14.3164,205.939L 7.76809,205.939L 7.76808,2.10588L 24.9764,2.10596C 26.109,2.10596 25.4545,2.43762 26.4765,2.10583C 32.7314,2.6167 35.9765,9.3073 35.9765,14.6684 Z " RenderTransformOrigin="0.5,0.5">
				<Path.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="-1" ScaleY="1"/>
					</TransformGroup>
				</Path.RenderTransform>
			</Path>
			<Button x:Name="PART_Header" Style="{StaticResource ControlMenuIconButton}" Canvas.Left="-0.217" VerticalAlignment="Top" Height="23" Margin="-1,1.5,0,0" Command="Controls:SinacorMenuCommands.UndockMenu"/>
			<StackPanel IsItemsHost="True" HorizontalAlignment="Center" Margin="-1,25,-1,0" Width="24" x:Name="PART_Dados" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="State" Value="DockedLeft">
				<Setter Property="Visibility" Value="Collapsed" TargetName="PART_BorderRight"/>
				<Setter Property="Visibility" Value="Visible" TargetName="PART_BorderLeft"/>
				<Setter Property="Margin" Value="0,1.5,-1,0" TargetName="PART_Header"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<Style TargetType="{x:Type Controls:SinacorMenu}">
		<Setter Property="Template" Value="{StaticResource ControlMenuDocked}"/>
		<Style.Triggers>
			<Trigger Property="State" Value="Floating">
				<Setter Property="Template" Value="{StaticResource ControlMenu}"/>
			</Trigger>
		</Style.Triggers>
	</Style>
	<Style TargetType="{x:Type ControlMenu:RootMenuItem}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ControlMenu:RootMenuItem}">
					<Border x:Name="Border" Margin="0,0,0,0">
						<Grid Height="25" Margin="5,0,5,0">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="0" x:Name="PART_ColumnLeftArrow"/>
								<ColumnDefinition Width="15"/>
								<ColumnDefinition Width="0" x:Name="PART_ColumnHeader"/>
								<ColumnDefinition Width="0" x:Name="PART_ColumnRightArrow"/>
							</Grid.ColumnDefinitions>
							<Path x:Name="SetaRight" Visibility="Collapsed" Grid.Column="0" Margin="0,16,0,0" Width="7.156" Height="8.263" Stretch="Fill" Fill="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" Data="F1 M 130.562,66.8049L 123.406,62.6733L 123.406,70.9365L 130.562,66.8049 Z ">
								<Path.RenderTransform>
									<TransformGroup>
										<RotateTransform Angle="180"/>
									</TransformGroup>
								</Path.RenderTransform>
							</Path>
							<Image x:Name="Icon" Grid.Column="1" Source="{TemplateBinding Icon}" Width="13" Height="13" VerticalAlignment="Center" ToolTip="{TemplateBinding Header}" ToolTipService.ShowOnDisabled="True"/>
							<TextBlock Grid.Column="2" x:Name="PART_Header" Padding="0" Foreground="{DynamicResource BrushMenuItemForeground}" Text="{TemplateBinding Header}" VerticalAlignment="Center" Style="{DynamicResource ControlFont}" Margin="6,0,0,0" TextTrimming="CharacterEllipsis" ToolTip="{TemplateBinding Header}"/>
							<Path x:Name="SetaLeft" Visibility="Collapsed" Grid.Column="3" Width="7.156" Height="8.263" HorizontalAlignment="Right" Stretch="Fill" Fill="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" Data="F1 M 130.562,66.8049L 123.406,62.6733L 123.406,70.9365L 130.562,66.8049 Z "/>
							<Popup x:Name="PART_Popup" Focusable="False" AllowsTransparency="True" Placement="Right" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" HorizontalOffset="6">
								<Popup.IsOpen>
									<MultiBinding Converter="{StaticResource boolConverter}">
										<Binding Path="IsSubmenuOpen" RelativeSource="{RelativeSource TemplatedParent}"/>
										<Binding Path="HasItems" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay"/>
									</MultiBinding>
								</Popup.IsOpen>
								<Grid>
									<Border Panel.ZIndex="999" CornerRadius="12" MinHeight="105" MaxHeight="277" Height="Auto" Background="{DynamicResource BrushMenuBackground}" BorderBrush="{DynamicResource BrushMenuBorder}" BorderThickness="2" VerticalAlignment="Stretch" x:Name="PART_Border" Width="218">
										<ScrollViewer VerticalScrollBarVisibility="Auto" Style="{DynamicResource ControlMenuScrollViewer}" VerticalAlignment="Stretch" Width="Auto">
											<StackPanel HorizontalAlignment="Stretch" Width="218" Orientation="Vertical">
												<StackPanel Orientation="Vertical" x:Name="PART_Module" Visibility="Collapsed">
													<StackPanel Orientation="Horizontal" Margin="15,2,0,5">
														<Button Style="{StaticResource ControlMenuRollBackModulesIconButton}"/>
														<TextBlock Margin="22,5,0,0" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=SelectedModule}" Foreground="{DynamicResource BrushMenuItemForeground}" Style="{DynamicResource ControlFont}"/>
													</StackPanel>
													<Path HorizontalAlignment="Stretch" Margin="-2,0,-2,2" Height="2" Stretch="Fill" SnapsToDevicePixels="False" StrokeThickness="1.5" StrokeLineJoin="Bevel" Stroke="{DynamicResource BrushMenuSeparator}" Data="F1 M 1.22913,49.5484L 137.479,49.5484"/>
												</StackPanel>
												<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
											</StackPanel>
										</ScrollViewer>
									</Border>
									<Border Panel.ZIndex="999" CornerRadius="12" Height="160" Background="{DynamicResource BrushMenuBackground}" BorderBrush="{DynamicResource BrushMenuBorder}" BorderThickness="2" VerticalAlignment="Stretch" x:Name="PART_Zoom" Width="85" Visibility="Collapsed">
										<ItemsPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
									</Border>
								</Grid>
							</Popup>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="Floating">
							<Setter Property="Width" Value="5" TargetName="PART_ColumnLeftArrow"/>
							<Setter Property="Width" Value="*" TargetName="PART_ColumnHeader"/>
							<Setter Property="Width" Value="13" TargetName="PART_ColumnRightArrow"/>
						</DataTrigger>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedRight">
							<Setter Property="HorizontalOffset" Value="-6" TargetName="PART_Popup"/>
						</DataTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True"/>
							</MultiTrigger.Conditions>
							<Setter Property="Background" Value="{DynamicResource BrushMenuItemBackgroundHover}" TargetName="Border"/>
							<Setter Property="Foreground" Value="{DynamicResource BrushMenuItemForeground}" TargetName="PART_Header"/>
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True"/>
								<Condition Property="HasItems" Value="True"/>
								<Condition Property="IsEnabled" Value="True"/>
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaLeft"/>
						</MultiTrigger>
						<Trigger Property="IsFocused" Value="True">
							<Setter Property="Background" Value="{DynamicResource BrushMenuItemBackgroundHover}" TargetName="Border"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsFocused" Value="True"/>
								<Condition Property="HasItems" Value="True"/>
								<Condition Property="IsEnabled" Value="True"/>
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaLeft"/>
						</MultiTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Foreground" Value="{DynamicResource BrushMenuItemForegroundDisabled}" TargetName="PART_Header"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsEnabled" Value="False"/>
								<Condition Property="IconName" Value="IconMenuModule"/>
							</MultiTrigger.Conditions>
							<Setter Property="Source" Value="{DynamicResource IconMenuModuleDisabled}" TargetName="Icon"/>
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsEnabled" Value="False"/>
								<Condition Property="IconName" Value="IconMenuWindows"/>
							</MultiTrigger.Conditions>
							<Setter Property="Source" Value="{DynamicResource IconMenuWindowsDisabled}" TargetName="Icon"/>
						</MultiTrigger>
						<Trigger Property="SubMenuContainerType" Value="ModuleSubMenu">
							<Setter Property="Visibility" Value="Visible" TargetName="PART_Module"/>
							<Setter Property="MinHeight" Value="140" TargetName="PART_Border"/>
							<Setter Property="MaxHeight" Value="308" TargetName="PART_Border"/>
						</Trigger>
						<Trigger Property="SubMenuContainerType" Value="ZoomSubMenu">
							<Setter Property="Visibility" Value="Visible" TargetName="PART_Zoom"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Border"/>
						</Trigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=SelectedModule}" Value="{x:Null}"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Module"/>
							<Setter Property="MinHeight" Value="105" TargetName="PART_Border"/>
							<Setter Property="MaxHeight" Value="277" TargetName="PART_Border"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=SelectedModule}" Value=""/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Module"/>
							<Setter Property="MinHeight" Value="105" TargetName="PART_Border"/>
							<Setter Property="MaxHeight" Value="277" TargetName="PART_Border"/>
						</MultiDataTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ControlSubmenuBase" TargetType="{x:Type Controls:SinacorMenuItem}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Controls:SinacorMenuItem}">
					<Border Margin="0,0,0,0">
						<Grid Height="16" Margin="0,1,0,1" x:Name="Border">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="5" x:Name="PART_ColumnLeftArrow"/>
								<ColumnDefinition Width="15" x:Name="PART_ColumnLeftIcon" />
								<ColumnDefinition Width="*" x:Name="PART_ColumnHeader"/>
								<ColumnDefinition Width="0" x:Name="PART_ColumnRightIcon" />
								<ColumnDefinition Width="23" x:Name="PART_ColumnRightArrow"/>
							</Grid.ColumnDefinitions>
							<Path x:Name="SetaLeft" Visibility="Collapsed" Grid.Column="0" Margin="4,0,0,0" Width="7.156" Height="8.263" Stretch="Fill" Fill="{DynamicResource BrushMenuSubitemArrowBackground}" Data="F1 M 130.562,66.8049L 123.406,62.6733L 123.406,70.9365L 130.562,66.8049 Z ">
								<Path.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="-1" ScaleY="1"/>
									</TransformGroup>
								</Path.RenderTransform>
							</Path>
							<Image x:Name="LeftIcon" Grid.Column="1" Source="{TemplateBinding Icon}" Width="13" Height="13" VerticalAlignment="Center" HorizontalAlignment="Left"/>
							<TextBlock Grid.Column="2" x:Name="PART_Header" Padding="0" Foreground="{DynamicResource BrushMenuItemForeground}" Text="{TemplateBinding Header}" VerticalAlignment="Center" Style="{DynamicResource ControlFont}" Margin="6,0,0,0" TextTrimming="CharacterEllipsis" ToolTip="{TemplateBinding Header}"/>
							<Image x:Name="RightIcon" Grid.Column="3" Source="{TemplateBinding Icon}" Width="13" Height="13" VerticalAlignment="Center" HorizontalAlignment="Right" />
							<Path x:Name="SetaRight" Visibility="Collapsed" Margin="0,0,5,0" Grid.Column="4" Width="7.156" Height="8.263" HorizontalAlignment="Right" Stretch="Fill" Fill="{DynamicResource BrushMenuSubitemArrowBackground}" Data="F1 M 130.562,66.8049L 123.406,62.6733L 123.406,70.9365L 130.562,66.8049 Z "/>
							<Popup x:Name="PART_Popup" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" AllowsTransparency="True" Placement="Right" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" HorizontalOffset="-2">
								<Border Panel.ZIndex="999" CornerRadius="12" MinHeight="105" MaxHeight="277" Height="Auto" Background="{DynamicResource BrushMenuBackground}" BorderBrush="{DynamicResource BrushMenuBorder}" BorderThickness="2" VerticalAlignment="Stretch" x:Name="PART_Border" Width="Auto">
									<ScrollViewer VerticalScrollBarVisibility="Auto" Style="{DynamicResource ControlMenuScrollViewer}" VerticalAlignment="Stretch" Width="Auto">
										<StackPanel HorizontalAlignment="Stretch" Width="Auto" Orientation="Vertical">
											<StackPanel Orientation="Vertical" x:Name="PART_Module" Visibility="Collapsed">
												<StackPanel Orientation="Horizontal" Margin="12,2,0,5">
													<Button Style="{StaticResource ControlMenuIconButton}"/>
													<TextBlock Margin="4.25,5,0,0" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=SelectedModule}" Foreground="{DynamicResource BrushMenuItemForeground}" Style="{DynamicResource ControlFont}"/>
												</StackPanel>
												<Path HorizontalAlignment="Stretch" Margin="-2,0,-2,2" Height="2" Stretch="Fill" SnapsToDevicePixels="False" StrokeThickness="1.5" StrokeLineJoin="Bevel" Stroke="{DynamicResource BrushMenuSeparator}" Data="F1 M 1.22913,49.5484L 137.479,49.5484"/>
											</StackPanel>
											<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
										</StackPanel>
									</ScrollViewer>
								</Border>
							</Popup>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedRight">
							<Setter Property="Width" Value="23" TargetName="PART_ColumnLeftArrow"/>
							<Setter Property="Width" Value="5" TargetName="PART_ColumnRightArrow"/>
							<Setter Property="Placement" Value="Left" TargetName="PART_Popup"/>
							<Setter Property="HorizontalOffset" Value="-2" TargetName="PART_Popup"/>
							<Setter Property="Margin" Value="0,0,0,0" TargetName="PART_Header"/>
							<Setter Property="Width" Value="0" TargetName="PART_ColumnLeftIcon"/>
							<Setter Property="Width" Value="20" TargetName="PART_ColumnRightIcon"/>
						</DataTrigger>
						<Trigger Property="Icon" Value="{x:Null}">
							<Setter Property="Width" Value="0" TargetName="PART_ColumnLeftIcon"/>
							<Setter Property="Width" Value="0" TargetName="PART_ColumnRightIcon"/>
						</Trigger>
						<Trigger Property="SubMenuContainerType" Value="ModuleSubMenu">
							<Setter Property="Visibility" Value="Visible" TargetName="PART_Module"/>
							<Setter Property="MinHeight" Value="140" TargetName="PART_Border"/>
							<Setter Property="MaxHeight" Value="308" TargetName="PART_Border"/>
						</Trigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=SelectedModule}" Value="{x:Null}"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Module"/>
							<Setter Property="MinHeight" Value="105" TargetName="PART_Border"/>
							<Setter Property="MaxHeight" Value="277" TargetName="PART_Border"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=SelectedModule}" Value=""/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Module"/>
							<Setter Property="MinHeight" Value="105" TargetName="PART_Border"/>
							<Setter Property="MaxHeight" Value="277" TargetName="PART_Border"/>
						</MultiDataTrigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" Value="{DynamicResource BrushMenuItemBackgroundHover}" TargetName="Border"/>
						</Trigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="Floating"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaRight"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaLeft"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedLeft"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaRight"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaLeft"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedRight"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaLeft"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaRight"/>
						</MultiDataTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True"/>
								<Condition Property="HasItems" Value="True"/>
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaRight"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaLeft"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" TargetName="SetaRight"/>
						</MultiTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedLeft"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaRight"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaLeft"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" TargetName="SetaRight"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedRight"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaLeft"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaRight"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" TargetName="SetaLeft"/>
						</MultiDataTrigger>
						<Trigger Property="IsFocused" Value="True">
							<Setter Property="Background" Value="{DynamicResource BrushMenuItemBackgroundHover}" TargetName="Border"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsFocused" Value="True"/>
								<Condition Property="HasItems" Value="True"/>
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaRight"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaLeft"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" TargetName="SetaRight"/>
						</MultiTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsFocused}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedLeft"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaRight"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaLeft"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" TargetName="SetaRight"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsFocused}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasItems}" Value="True"/>
								<Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Controls:SinacorMenu}}, Path=State}" Value="DockedRight"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Visibility" Value="Visible" TargetName="SetaLeft"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="SetaRight"/>
							<Setter Property="Fill" Value="{DynamicResource BrushMenuSubitemArrowBackgroundFocused}" TargetName="SetaLeft"/>
						</MultiDataTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Foreground" Value="{DynamicResource BrushMenuItemBackgroundHover}" TargetName="PART_Header"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="{x:Type ControlMenu:FavoriteSubMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}" />
	<Style TargetType="{x:Type ControlMenu:FavoriteMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:CompanyMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:ModuleMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:ConfigurationMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:WindowMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:SubMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:LanguageMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:ThemeMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:DockMenuItem}" BasedOn="{StaticResource ControlSubmenuBase}"/>
	<Style TargetType="{x:Type ControlMenu:ZoomMenuItem}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ControlMenu:ZoomMenuItem}">
					<Border x:Name="Border" Margin="0,0,0,0" Width="65" Height="140">
						<Controls:SinacorZoom x:Name="PART_Zoom" ShowRestore="True" CurrentZoom="100"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>
